#ifndef MAINSCENE_H
#define MAINSCENE_H

#include <QMainWindow>
#include<head.h>
#include<master.h>
#include<bottle1.h>
#include<people.h>


class mainscene : public QMainWindow
{
    Q_OBJECT
public:
    explicit mainscene(QWidget *parent = nullptr);

    void paintEvent(QPaintEvent *event);
    //背景横坐标
    int bacx=-3000;

    double score=0;

    QRect brick[81],backgro1,backgro2;
    bool winornot=false;

    QTimer timeEnemy;
    QTimer timeBoy;
    //障碍物对象
    master mas;
    bottle1 bot1;

    //人物对象
    people man;

    void playgame();
    void updatePosition();
    void barrierToScene();
    void keyPressEvent(QKeyEvent *event);

    bool collisionDetection();




signals:

public slots:
};



#endif // MAINSCENE_H
